//
// Created by hjie on 23-9-17.
//

#pragma once

#include "./../../loop_event/loop_event_define.h"
#include "./../stun_message.h"

class MessageProcess;

class StunServer
{
public:
    StunServer(LoopEvent * loop_event);
    ~StunServer();
    int Listen(int port);
public:
    void OnMessage(UdpPacket *packet);
    void ProcessStunMessage(UdpBufferPacket & packet, StunMessage & message);
public:
    LoopEvent * m_loop_event;
    UdpServer * m_udp_server;
    int m_listen_port;
public:
    std::shared_ptr<MessageProcess> m_process_ptr;
};
